﻿using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IService
{
    public interface IProjectService : ICommonService
    {
        ProjectFiled CreateProjectFiled(ProjectFiled obj);

        ProjectItem CreateProjectItem(ProjectItem obj);

        IList<ProjectItem> ListProjectItem(int projectNO);

        ProjectItem GetProjectItem(int projectNO, int roleNO, int contactNO);

        IList<Models.ProjectFiled> ListProjectFiled(int projectNO, ProjectFiledFun fun);

        void UpdateProjectItem(Models.ProjectItem obj);

        IList<ProjectExtend> ListProjectExtend(int projectNO, ProjectExtendFun fun);

        void DeleteProjectExtend(int projectNO, ProjectExtendFun fun);

        ProjectExtend CreateProjectExtend(ProjectExtend obj);

        IList<Project> ListProjectByStatusAndbelongNO(int belongNO, APPRole role, ProjectStatus status);

        IList<Project> ListProjectByStatus(int belongNO, ProjectStatus status);

        IList<Project> ListProjectByStatus(int belongNO, ProjectStatus status, CommonStatus bookStatus);
        IList<Project> ListProjectForDisplayCompany(IList<int> cityNo, int EntrantsAmountNO, IList<int> lstType, DateTime dtbegin, DateTime dtend, int money, APPRole role);
        IList<Project> ListContactSituationEnter(int contactNO, APPRole role, ChooseType chooseType);
        /// <summary>
        /// 智能推荐社团
        /// </summary>
        /// <param name="projectNo"></param>
        /// <param name="lstType">文艺类</param>
        /// <param name="dtBegin">活动开始时间</param>
        /// <param name="money">总的贡献多少钱</param>
        /// <param name="schoolAmount">要多少间高校</param>
        /// <param name="lstSchool">指定高校</param>
        /// <param name="lstCity">指定地区</param>
        /// <returns></returns>
        IList<Project> ListRecommendAssociation(int projectNo, IList<int> lstType, DateTime dtBegin,
            double money, int schoolAmount, IList<int> lstSchool, IList<int> lstCity);
        /// <summary>
        /// 选好高校之后，创建意向活动高校
        /// </summary>
        /// <param name="projectNo"></param>
        /// <param name="lstAssociationNO">选好的社团</param>
        void CreateRecommendProject(int projectNo, IList<int> lstAssociationProjectNO, string oper);

        /// <summary>
        /// 1.合作策划书状态：
        ///   策划书已生成：Project.BookStatus
        ///   社团确认：ProjectItem.IsStudentConfirm
        ///   企业确认：ProjectItem.IsCompanyConfirm
        /// 2.活动反馈（ProjectFiled）
        ///   第一次：ProjectFiledFun.FirstFeedback
        ///   第二次：ProjectFiledFun.SecondFeedback
        /// 3.是否有平台线下团队服务（ProjectItem）
        ///   HaveOffLineTeam
        ///   
        /// 4.反馈内容：（ProjectFiled）
        ///   ProjectFiledFun.LineTeam
        /// 5.申请发票（ProjectItem）
        ///   HaveInvoice
        /// </summary>
        /// <param name="roleNO"></param>
        /// <param name="role"></param>
        /// <param name="chooseType"></param>
        /// <returns></returns>
        IList<Project> ListCooperationProject(int roleNO, APPRole role, ChooseType chooseType);

        /// <summary>
        /// 社团联系情况
        /// 这里会将ProjectItem的Association 这个对象拿出来。需要社团的信息就在这里拿
        /// </summary>
        /// <param name="roleNO"></param>
        /// <param name="role"></param>
        /// <param name="chooseType"></param>
        /// <returns></returns>
        IList<Project> ListContactSituation(int roleNO, APPRole role, ChooseType chooseType);

        IList<Project> ListMyProject(int roleNO, APPRole role, ProjectStatus projectStatus);

        /// <summary>
        /// 企业下架赞助书
        ///     下架原因是Project里的ListRule拿
        ///     对应的原因是Level_Rule表中的RuleFunction.CancelRemark
        /// </summary>
        /// <param name="roleNO"></param>
        /// <param name="role"></param>
        /// <returns></returns>
        IList<Project> ListProjectByRoleNoInprogress(int roleNO, APPRole role);
        IList<Project> ListProjectByRoleNoAndStatusForDisplay(int roleNO, APPRole role, ProjectStatus status);

        void CancelProject(int projectNo, string remark);
        //IList<Models.ProjectFiled> PromoteAssosiation(Project project);
        //IList<Models.ProjectFiled> ListAssosiationForSelect(int projectNO);

        IList<Project> ListTopProjectOrderBy(APPRole role, int topNum, OrderByColum colum, ProjectStatus status);
        IList<Project> ListProjectForDisplay(string roleName, int cityNo, int EntrantsAmountNO, IList<int> lstType, DateTime dtbegin, DateTime dtend, int money, APPRole role);

        IList<Project> ListProjectByStatus(int RoleNO, IList<ProjectStatus> lstStatus);

        IList<Project> ListProjectForCompanyPay(int companyID);
        IList<Project> ListProjectByStatusAndContactNO(int contactNO, APPRole role, ProjectStatus status);
        IList<Project> ListProjectByStatusAndContactNO(int contactNO, IList<ProjectStatus> lstStatus);
    
        IList<Project> ListCooperationProjectForStudent(int contactNO, APPRole role, ChooseType chooseType);
        IList<ProjectItem> ListProjectItemByIntentionContact(int intentionContactNO, ProjectItemStatus Status, ChooseType chooseType);
        IList<Project> ListProjectByStatus(APPRole role, ProjectStatus status);
    }
}
